<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }
      .snow {
        width: 122px;
        height: 180px;
        background: url("./img/snowman.jpg") no-repeat;
        animation: run 1s steps(4, start) infinite;
      }
      @keyframes run {
        0% {
          background-position-x: 0;
        }
        100% {
          background-position-x: -488px;
        }
      }
    </style>
  </head>
  <body>
    <!-- 逐帧动画 : 切换背景图的位置 -->
    <div class="snow"></div>
  </body>
</html>
